package com.cennavi.bigdata.baotou.controller;

import com.cennavi.bigdata.baotou.service.CrontabService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by wangshipeng on 2018/4/21.
 */
@Controller
@RequestMapping("/crontab")
public class CrontabController {

    @Autowired
    private CrontabService crontabService;

    @ResponseBody
    @RequestMapping("/inserPgFromOracle")
    public String inserPgFromOracle(){

        String start = "2018-01-01 00:00:00";
        String end = "2018-01-31 23:30:00";
        crontabService.inserPgFromOracle(start,end);

        return null;
    }
}
